Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/use dark mode preference to set initial theme.light #861

Merged

Conversation

FaberVitale
Copy link
Contributor

Description

Displays @redux-devtools/app and redux-devtools-extension in dark mode if the following conditions are all true:

  1. user prefers dark color scheme according to https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
  2. user has not edited applied changes to the default theme using settings > theme form.

@FaberVitale FaberVitale force-pushed the feat/use-user-dark-mode-preference branch from ad0d2eb to c3ec188 Compare September 14, 2021 16:32
@FaberVitale FaberVitale changed the title Feat/use user dark mode to set theme.light Feat/use dark mode preference to set initial theme.light Sep 14, 2021
@FaberVitale FaberVitale mentioned this pull request Oct 24, 2021
38 tasks
@FaberVitale FaberVitale force-pushed the feat/use-user-dark-mode-preference branch from c3ec188 to 9f6ba05 Compare October 24, 2021 09:36
@FaberVitale
Copy link
Contributor Author

rebased

Copy link
Member

@Methuselah96 Methuselah96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this! Sorry for taking so long to look at it.

packages/redux-devtools-app/src/reducers/theme.ts Outdated Show resolved Hide resolved
@FaberVitale FaberVitale force-pushed the feat/use-user-dark-mode-preference branch from 9f6ba05 to 5a4b3e5 Compare October 30, 2021 16:48
@FaberVitale
Copy link
Contributor Author

I've implemented the changes requested in #861 (comment)

…ght` if user has not set a preferred theme
Error message:

0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: test/__mocks__/styleMock.ts.
The file must be included in at least one of the projects provided
Copy link
Member

@Methuselah96 Methuselah96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all your help! 🚀 Sorry for the delayed reviews.

@Methuselah96 Methuselah96 merged commit 90cde4c into reduxjs:main Nov 6, 2021
@@ -3,6 +3,6 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.css$': '<rootDir>/test/__mocks__/styleMock.ts',
'\\.css$': '<rootDir>/test/__mocks__/styleMock.js',
Copy link
Member

@Methuselah96 Methuselah96 Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it causing problems for this to be ts?

Copy link
Contributor Author

@FaberVitale FaberVitale Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not recall exactly, luckily I wrote a detailed commit message.

chore(@redux-devtools/app): fix lint error

Error message:

0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: test/__mocks__/styleMock.ts.
The file must be included in at least one of the projects provided

Copy link
Member

@Methuselah96 Methuselah96 Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice commit message! I wonder if this was fixed by #867.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants